Spectrum Derived Type

type, public :: Spectrum


Components

Type Visibility Attributes Name Initial
integer, public :: size

size of spectrum

real(kind=wp), public :: input_power

power of spectrum

real(kind=wp), public :: power_ratio

доля входной мощности

real(kind=wp), public :: max_power
real(kind=wp), public :: sum_power

суммарная power

integer, public :: direction

направление спектра +1 или -1 или 0 - полный

type(SpectrumPoint), public, allocatable :: data(:)

Constructor

public interface Spectrum

  • public function spectrum_constructor(size) result(this)

    Arguments

    Type IntentOptional Attributes Name
    integer, value :: size

    Return Value type(Spectrum)


Type-Bound Procedures

procedure, public :: get_positive_part => get_positive_part_method

procedure, public :: get_negative_part => get_negative_part_method

procedure, public :: calc_max_power => calc_max_power_method

procedure, public :: normalization => normalization_method

procedure, public :: integral_trapez => integral_trapez_method

  • public function integral_trapez_method(this) result(sum)

    вычисление полной мощности спектра интегрирование методом трапеций

    Arguments

    Type IntentOptional Attributes Name
    class(Spectrum), intent(in) :: this

    Return Value real(kind=wp)

procedure, public :: write => write_spectrum

  • public subroutine write_spectrum(this, spectrum_name)

    write spectrum to file

    Arguments

    Type IntentOptional Attributes Name
    class(Spectrum), intent(inout) :: this
    character(len=*), intent(in) :: spectrum_name